#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2020/6/10 0010 20:21
# @Author  : wzy
# @Site    : 
# @File    : readconfig.py
# @Software: PyCharm

import configparser
from testFile.getpathInfo import get_path
path = get_path() + "/config/config.ini"
config = configparser.ConfigParser()
config.read(path,encoding='utf-8')

class ReadConfig():

    def get_http(self,name):
        get_http = config.get('HTTP',name)
        return get_http

    def get_email(self, name):
        get_email = config.get('EMAIL', name)
        return get_email

    # 读取配置文件mysql  暂时没用到
    def get_mysql(self,name):
        get_mysql = config.get('mysql',name)
        return get_mysql
readConfig = ReadConfig()
if __name__ == '__main__':
    # print(path)
    # print(config)
    print(readConfig.get_http('scheme'))